package com.furentech.iotserver.fa.server.handler;

import com.furentech.iotserver.fa.server.ChannelUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class ChannelInit  extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {

        ChannelUtil.setAuthReq2Flag(ctx.channel(), false);
        ChannelUtil.setCbRecordFlag(ctx.channel(), false);
        ChannelUtil.setReqDispenserInfoFlag(ctx.channel(), false);
        ChannelUtil.setReqVTotFlag(ctx.channel(), false);
        ChannelUtil.setReqSignInFlag(ctx.channel(), false);
        ChannelUtil.setReqOnlineFlag(ctx.channel(), false);
        ChannelUtil.setReqDebitFlag(ctx.channel(), false);
        ChannelUtil.setReqReverseFlag(ctx.channel(), false);

        ctx.pipeline().remove(this);

        super.channelRead(ctx, msg);
    }
}
